<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:Phone7ActionPack.Controls">


    <Style TargetType="local:NetworkInformationControl">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:NetworkInformationControl">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="local:LocationVisualControl">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:LocationVisualControl">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="56"/>
                                <RowDefinition Height="56"/>
                                <RowDefinition Height="56"/>
                                <RowDefinition Height="56"/>
                                <RowDefinition Height="56"/>
                                <RowDefinition Height="56"/>
                                <RowDefinition Height="56"/>
                                <RowDefinition Height="56"/>
                                <RowDefinition Height="56"/>

                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="200"/>
                                <ColumnDefinition />
                            </Grid.ColumnDefinitions>
                            <TextBlock x:Name="EnableLocationLabel" Text="Enable Location" VerticalAlignment="Center" Margin="0,0,2,0"/>
                            <!-- Please take note of how the binding below is done. you can't use just the normal TemplateBinding because it doesn't seem to update when what it is bound to changes use the following type of binding -->
                            <!-- {Binding LocationWatcherEnabled, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}} -->
                            <CheckBox Grid.Column="1" x:Name="LocationWatcherEnabledCheckBox" IsChecked="{Binding LocationWatcherEnabled, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>
                            <TextBlock x:Name="LatitudeLabel" Text="Latitude" VerticalAlignment="Center" Margin="0,0,2,0" Grid.Row="1"/>
                            <TextBlock x:Name="LongitudeLabel" Text="Longitude" VerticalAlignment="Center" Margin="0,0,2,0" Grid.Row="2"/>
                            <TextBlock x:Name="HorzontalAccuracyLabel" Text="Horizontal Accuracy" VerticalAlignment="Center" Margin="0,0,2,0" Grid.Row="3"/>
                            <TextBlock x:Name="VerticalAccuracyLabel" Text="Vertical Accuracy" VerticalAlignment="Center" Margin="0,0,2,0" Grid.Row="4"/>
                            <TextBlock x:Name="LastReadingLabel" Text="Last Reading Time" VerticalAlignment="Center" Margin="0,0,2,0" Grid.Row="5"/>
                            <TextBlock x:Name="CourseLabel" Text="Course" VerticalAlignment="Center" Margin="0,0,2,0" Grid.Row="6" />
                            <TextBlock x:Name="SpeedLabel" Text="Speed" VerticalAlignment="Center" Margin="0,0,2,0" Grid.Row="7"/>
                            <TextBlock x:Name="Latitude" TextWrapping="Wrap" Text="{Binding Latitude, RelativeSource={RelativeSource TemplatedParent}}" Margin="4,0,0,0" Grid.Row="1" Grid.Column="1" VerticalAlignment="Center"/>
                            <TextBlock x:Name="Longitude" TextWrapping="Wrap" Text="{Binding Longitude, RelativeSource={RelativeSource TemplatedParent}}" Margin="4,0,0,0" Grid.Row="2" Grid.Column="1" VerticalAlignment="Center"/>
                            <TextBlock x:Name="HorizontalAccuracy" TextWrapping="Wrap" Text="{Binding HorizontalAccuracy, RelativeSource={RelativeSource TemplatedParent}}" Margin="4,0,0,0" Grid.Row="3" Grid.Column="1" VerticalAlignment="Center"/>
                            <TextBlock x:Name="VerticalAccuracy" TextWrapping="Wrap" Text="{Binding VerticalAccuracy, RelativeSource={RelativeSource TemplatedParent}}" Margin="4,0,0,0" Grid.Row="4" Grid.Column="1" VerticalAlignment="Center"/>
                            <TextBlock x:Name="LastReadingTime" TextWrapping="Wrap" Text="{Binding CurrentLocationTimestamp, RelativeSource={RelativeSource TemplatedParent}}" Margin="4,0,0,0" Grid.Row="5" Grid.Column="1" VerticalAlignment="Center"/>
                            <TextBlock x:Name="Course" TextWrapping="Wrap" Text="{Binding Course, RelativeSource={RelativeSource TemplatedParent}}" Margin="4,0,0,0" Grid.Row="6" Grid.Column="1" VerticalAlignment="Center"/>
                            <TextBlock x:Name="Speed" TextWrapping="Wrap" Text="{Binding Speed, RelativeSource={RelativeSource TemplatedParent}}" Margin="4,0,0,0" Grid.Row="7" Grid.Column="1" VerticalAlignment="Center"/>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>
